// ============================== 列表请求体 ============================== //

export class ListReq {
  constructor() {
    this.obj = {
      comReq: undefined,
      comQuery: undefined,
      roleName: '',
      roleType: 0,
      roleTypesList: [],
      beginDate: 0,
      endDate: 0,
      status: 0,
    }
  }

  toObject() {
    return this.obj
  }

  setComQuery(comQuery) {
    if (comQuery && comQuery.toObject) this.obj.comQuery = comQuery.toObject()
  }

  setRoleName(roleName) {
    this.obj.roleName = roleName
  }

  setRoleType(roleType) {
    this.obj.roleType = roleType
  }

  setRoleTypesList(roleTypesList) {
    this.obj.roleTypesList = roleTypesList
  }

  setBeginDate(beginDate) {
    this.obj.beginDate = beginDate
  }

  setEndDate(endDate) {
    this.obj.endDate = endDate
  }

  setStatus(status) {
    this.obj.status = status
  }
}

// ============================== 角色结构体 ============================== //

export class RoleDto {
  constructor() {
    this.obj = {
      id: '',
      tenantNo: 0,
      roleName: '',
      roleType: 0,
      roleTypesList: [],
      remark: '',
      status: 0,
      createTime: 0,
    }
  }

  toObject() {
    return this.obj
  }

  setId(id) {
    this.obj.id = id
  }

  setTenantNo(tenantNo) {
    this.obj.tenantNo = tenantNo
  }

  setRoleName(roleName) {
    this.obj.roleName = roleName
  }

  setRoleType(roleType) {
    this.obj.roleType = roleType
  }

  setRoleTypesList(roleTypesList) {
    this.obj.roleTypesList = roleTypesList
  }

  setRemark(remark) {
    this.obj.remark = remark
  }

  setStatus(status) {
    this.obj.status = status
  }

  setCreateTime(createTime) {
    this.obj.createTime = createTime
  }
}

// ============================== 删除请求体 ============================== //

export class DeleteReq {
  constructor() {
    this.obj = { id: '' }
  }

  toObject() {
    return this.obj
  }

  setId(id) {
    this.obj.id = id
  }
}
